<template>
  <quill-editor
    class="editor"
    :value="content"
    ref="myQuillEditor"
    :options="editorOption"
    @change="change($event)"
  />
</template>

<script>
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
 
import { quillEditor } from 'vue-quill-editor'
export default {
  components: {
    quillEditor
  },
  data () {
    return {
      editorOption: {}
    }
  },
  props: {
    content: {
      type: String
    }
  },
  methods: {
    change({ quill, html, text }) {
      console.log('editor change!', quill, html, text)
      this.$emit('update:content', html)
    },
  },
}
</script>

<style>

</style>